package com.xbongbong.pro.businessproduct.pojo.dto;

import com.alibaba.fastjson.JSONArray;
import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotNull;

/**
 * @author feng.zheng
 * @version v1.0
 * @date 2019/2/25 11:11
 * @since v1.0
 */
@Getter
@Setter
@ToString
public class BusinessProductListDTO extends BaseDTO {
    private static final long serialVersionUID = -2653818801199583146L;

    /**
     * 应用id
     */
    @NotNull(message = "{dto.msg.businessProductList.appId.NotNull}")
    private Long appId;

    /**
     * 菜单id
     */
    private Long menuId;

    /**
     * 表单id
     */
    private Long formId;

    /**
     * saas标记
     */
    @NotNull(message = "{dto.msg.businessProductList.saasMark.NotNull}")
    private Integer saasMark;

    /**
     * saas业务类型
     */
    @NotNull(message = "{dto.msg.businessProductList.businessType.NotNull}")
    private Integer businessType;

    /**
     * saas源业务类型
     */
    private Integer sourceBusinessType;

    /**
     * 单据id
     */
    @NotNull(message = "{dto.msg.businessProductList.dataId.NotNull}")
    private Long dataId;

    /**
     * 退货退款兼容单据id
     */
    private Long refundDataId;

    /**
     * 是否是入库单选择产品
     */
    private Integer fromInstock;

    /**
     * 是否是详情，默认不是
     */
    private Boolean detailGet;

    /**
     * 是否是出库单选择产品
     */
    private Integer fromOutstock;

    /**
     * 入库单选择生产单时，判断是退料入库还是成品入库
     */
    private Integer type;

    /**
     * 入库单(编辑)选择采购合同产品时，会传入该值
     */
    private Long instockId;

    /**
     * 出库单id
     */
    private Long outstockId;

    /**
     * 待生产时会传入成品数组
     */
    private JSONArray finishedProductArray;

    private Boolean forProcess;
    /**
     * 来自关联新建
     */
    private Boolean forLinkAdd;

    /**
     * 产品分类id
     */
    private Long categoryId;

    private Integer page;

    private Integer pageSize;

    private String attr;

    public BusinessProductListDTO() {
        forProcess = false;
        detailGet = false;
        page = 1;
        pageSize = 1000;
    }
}
